const Router = require("koa-router")
const app = new Router({ prefix: "/user" })
const { isnull, jiami, ishas, isok } = require('../../zjj/user')
const { islogin } = require('../../zjj/hose')
const { userzc, userlogin, sdlogin, findid, updateimage, updatename, userallsum, baibai, getunlinedata } = require('../../controllers/userlogin')
app.get('/zc', isnull, ishas, jiami, userzc)
app.get('/login', isnull, isok, userlogin)
app.post('/sdlogin', sdlogin)
app.get('/:id', islogin, findid)
app.post('/updateimage', islogin, updateimage)
app.post('/updatename', islogin, updatename)
app.post('/userallsum', islogin, userallsum)
app.post('/baibai', islogin, baibai)
app.post('/getunlinedata', islogin, getunlinedata)
module.exports = app;   